<template>
  <view class="container">
    <!-- 头部背景图 -->
    <image src="/sub_shop/static/images/swiperbgc.png" mode="" class="swiperbgc"></image>
    <!-- 头部搜索组件 -->
    <headerCom style="position: absolute; top: 50rpx">
      <template #sort>
        <image src="/sub_shop/static/images/sort.png" mode="" style="width: 38rpx; height: 38rpx; margin-left: 100rpx"></image>
      </template>
    </headerCom>

    <!--商品列表 -->
    <view class="goods">
      <view class="goodsitem" v-for="index in 9" :key="index">
        <image src="../../static/image/download/code.png" mode="" class="goodsitemimage"></image>
        <view class="goodsinfo">
          <view class="goodsname singe-line">Apple 苹果 IPone14ProApple 苹果 IPone14Pr</view>
          <view>
            <text style="font-size: 22rpx; color: red">￥</text>
            <text style="font-size: 32rpx; color: red">4688.00</text>
          </view>
        </view>
      </view>
    </view>

    <!-- 底部组件 -->
    <footerCom style="position: fixed; bottom: 0"></footerCom>
    <!-- 解决固定定位的覆盖问题 -->
    <view style="position: relative; bottom: 0; width: 750rpx; height: 98rpx"></view>
  </view>
</template>

<script>
import headerCom from '@/components/headersearch/headersearch.vue';
import footerCom from '@/components/shopfooter/shopfooter.vue';
export default {
  components: {
    headerCom,
    footerCom
  },
  data() {
    return {};
  }
};
</script>

<style lang="less" scoped>
.container {
  .swiperbgc {
    width: 750rpx;
    height: 176rpx;
  }

  .goods {
    display: flex;
    flex-wrap: wrap;
    margin-top: 20rpx;
    .goodsitem {
      width: 340rpx;
      height: 460rpx;
      margin-left: 26rpx;
      margin-bottom: 20rpx;
      .goodsitemimage {
        width: 340rpx;
        height: 340rpx;
      }
      .goodsinfo {
        width: 340rpx;
        height: 120rpx;
        .goodsname {
          font-size: 28rpx;
        }
        .singe-line {
          text-overflow: ellipsis;
          overflow: hidden;
          word-break: break-all;
          white-space: nowrap;
        }
      }
    }
  }
}
</style>
